package action.common;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import dao.common.EmployeeDao;
import dao.common.RepertoryDao;
import model.common.Employee;
import model.common.Repertory;

public class RepertoryAction {
   public void add(Repertory r) throws SQLException{
	   RepertoryDao dao=new RepertoryDao();
	   dao.addRepertory(r);
   }
   
   public void delete(Integer goodsId) throws SQLException{
	   RepertoryDao dao=new RepertoryDao();
	   dao.deleteRepertory(goodsId);
   }
   
   public void edit(Repertory r) throws SQLException{
	   RepertoryDao dao=new RepertoryDao();
	   dao.updateRepertory(r);
   }
   
   public void get(Integer goodsId) throws Exception{
	   RepertoryDao dao=new RepertoryDao();
	   dao.get(goodsId);
   }
   
   public List<Repertory> query(List<Map<String, Object>> params) throws Exception{
	   RepertoryDao dao=new RepertoryDao();
		return dao.query(params);
		
	}
	
	public List<Repertory> query(String goodsName,String goodsManufacturer) throws Exception{
		RepertoryDao dao=new RepertoryDao();
		return dao.query(goodsName, goodsManufacturer);
		
	}
}
